<extend name="common/base"/>

<block name="body">
    <table class="table table-bordered datatable"
           data-toggle="datagrid"
           data-options="{
        id:'aid',
        width:'100%',
        height:'100%',
        showLinenumber:true,
        selectMult:true,
        showCheckboxcol:true,
        showEditbtnscol:true,
        showToolbar: true,
        toolbarItem: 'del,add,edit,save,refresh',
        toolbarCustom: getSearchForm,
        dataUrl:'{:url('getDatas')}',
        editUrl:'{:url('edit')}',
        delUrl:'{:url('del')}',
        dataFrom:'remote',
        dataPK: 'aid',
        editMode: 'navtab',
    }"
           >
        <thead>
            <tr>
                <th data-name="title" width="70">标题</th>
            </tr>
        </thead>
        <tbody>
        </tbody>
    </table>
</block>
<block name="script">
<script type="text/javascript">
    function edit(obj){

    }
    function trash(obj) {

    }
    function reSearch(){

    }
        function getSearchForm(){
            html = '<label>标题：</label><input type="text" style="width: 100px;" size="10" class="form-control" name="title" value="" id="title">';
            html += '<button data-icon="search" class="btn btn-primary" type="submit" onclick="return reSearch();"><i class="icon icon-search"></i> 查询</button>';
            return html;
        }
</script>
</block>
